<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 山有木兮木有枝
  Date: 2021/11/29
  Time: 18:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <!-- 包含头部信息用于适应不同设备 -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>后台管理</title>
    <style>
        .content{
            height:100%;
            background: url("${pageContext.request.contextPath}/static/img/back.jpg") center center no-repeat;
        }
        .footer{
            margin-top: 10px;
            height: 60px;
            line-height: 60px;
            background-color: whitesmoke
        }
        .row{
            height: 750px;
            margin-right:0 !important;
            margin-left:0 !important;
        }
        .nav-left{
            height: 100%;
            background-color: #ECECED
        }
    </style>
    <!-- 包含 bootstrap 样式表 -->
    <link rel="stylesheet" href="https://apps.bdimg.com/libs/bootstrap/3.2.0/css/bootstrap.min.css">
    <!-- 可选: 包含 jQuery 库 -->
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <!-- 可选: 合并了 Bootstrap JavaScript 插件 -->
    <script src="https://apps.bdimg.com/libs/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse"><!-- 修改为反显效果-->
    <div class="container-fluid">
        <!-- 显示logo -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">文章发布后台管理</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <!-- 右为普通导航条 -->
            <!--<a class="btn btn-default" href="#" role="button" id = "msg">Link</a>-->
            <ul class="nav navbar-nav navbar-right">
                <!--<li><a href="#">当前用户:<span class="badge">小明</span></a></li>-->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">当前用户:<span class="badge">${sessionScope.LoginName}</span><span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="#">修改密码</a></li>
                        <li><a href="#">个人详情</a></li>
                    </ul>
                </li>
                <li>
                    <a href="${pageContext.request.contextPath}/main/loginOut"><span class="glyphicon glyphicon glyphicon-lock" aria-hidden="true"></span>注销</a>
                </li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div class="row">
    <div class="col-lg-2 text-center nav-left">

        <C:forEach var="FatherList" items="${sessionScope.list}" varStatus="status">
            <div class="panel-group" id="${FatherList.fatherFunctionID}-${status.index}">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#${FatherList.fatherFunctionID}-${status.index}"
                               href="#${FatherList.fatherFunctionID}-${status.index}-${status.index}" class="collapsed"
                               aria-expanded="false">${FatherList.fatherFunctionName}</a>
                        </h4>
                    </div>
                    <div id="${FatherList.fatherFunctionID}-${status.index}-${status.index}" class="panel-collapse collapse" aria-expanded="false" style="height: 0px;">

                        <div class="panel-body">
                            <ul class="nav nav-pills nav-stacked">
                                <c:forEach items="${FatherList.childrenFunction}" var="childrenFunction">
                                    <li><a href="${pageContext.request.contextPath}/${childrenFunction.funAddr}">${childrenFunction.funName}</a></li>
                                </c:forEach>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </C:forEach>
    </div>

    <div class="col-lg-10 content">
        <h3 class="text-center">欢迎使用本系统！</h3>
    </div>
</div>

<%--[AuthorityUser{FatherFunctionID='12rere', FatherFunctionName='系统类管理', --%>
<%--ChildrenFunction=[SystemFunction{funId='12787', funName='系统功能管理', funAddr='/sysfunction', funPid='null', funState=null}, --%>
<%--SystemFunction{funId='rexsdas', funName='用户管理', funAddr='/user', funPid='null', funState=null},--%>
<%--SystemFunction{funId='tyeeee', funName='角色管理', funAddr='/role', funPid='null', funState=null}]}, --%>
<%--AuthorityUser{FatherFunctionID='eeds', FatherFunctionName='文章类管理', --%>
<%--ChildrenFunction=[SystemFunction{funId='dsfdfs', funName='文章管理', funAddr='/article', funPid='null', funState=null}, --%>
<%--SystemFunction{funId='sfsdfdfds', funName='文章类型管理', funAddr='/articletype', funPid='null', funState=null}]}]--%>

<div class="footer">
    <p class="text-center">
        2018 © 本本科技.
    </p>
</div>

</body></html>
